//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************

namespace Microsoft.Research.eResearch.RuntimeServices.Blackboard
{
    using System.Workflow.Runtime.Hosting;
    using Microsoft.Research.eResearch.Blackboard.Common;
    using Microsoft.Research.eResearch.RuntimeServices.Logging;

    public class DummyBlackboardService : WorkflowRuntimeService, IBlackboardService
    {
        public DummyBlackboardService()
        {
        }

        public SubscriptionProfile LastSubscriptionProfile { get; private set; }

        public void PublishMessage(BlackboardMessage message)
        {
            ILoggingService log = this.Runtime.GetLoggingService();
            log.Debug(message.ToString());
        }

        protected override void OnStarted()
        {
            base.OnStarted();

            // Make sure that we have a logging service
            this.Runtime.GetLoggingService();
        }
    }
}
